import { Key } from "@ant-design/pro-components";
import { ReactElement } from "react";

// 目的地
export type destinaionTypes = {
  id?: string;
  country: string;
  countryName: string;
  destType: string;
  destCode: string;
  address: string;
  city: string;
  state: string,
  zip: string;
  createTime: string;
}
// 服务商
export type serviceTypes = {
  id?: string;
  type: string;
  fullName: string;
  name: string;
  code: string;
  createTime: string;
}
// 仓库
export type warehouseTypes = {
  name: string;
  fulleName: string;
  province: string;
  city: string;
  area: string;
  address: string;
  contacts: string;
  tel: string;
  openingTime: string;
  closingTime: string;
  remark: string;
  createTime: string;
  [x: string]: string;
}
// 港口
export type portColumnTypes = {
  index: number;
  country: string;
  city: string;
  portName: string;
  portEnName: string;
  createTime: string
}
// 字典值
export type dictValueTypes = {
  id?: string;
  dictType?: string;
  dictLabel: string;
  dictValue: string;
  remark?: string;
  sort?: number;
  label?: string;
  value?: string;
}
// 字典项
export type dictTypeTypes = {
  dictType: string;
  dictName: string;
  dictValues: Array<dictValueTypes>
}
// 船期
export type lineBatchTypes = {
  id?: string,
  lineId?: string,
  year?: string,
  week?: string,
  country?: string,
  countryName?: string,
  product?: string,
  productName?: string,
  sportCode?: string,
  sportName?: string,
  dportCode?: string,
  dportName?: string,
  shipCodes?: string,
  shipNames?: string,
  cwhCodes?: string,
  cwhNames?: string,
  shipTime?: string,
  cutoffTime?: string,
  createTime?: string,
  createBy?: string,
}
// 线路
export type lineTypes = {
  id?: string,
  country?: string,
  countryName?: string,
  product?: string,
  productName?: string,
  sportCode?: string,
  sportName?: string,
  dportCode?: string,
  dportName?: string,
  shipCodes?: string,
  shipNames?: string,
  cwhCodes?: string,
  cwhNames?: string,
  createTime?: string,
  createBy?: string,
}
// 报价表
export type lineQuoteTypes = {
  [x: string]: string;
}
// 客户
export type companyTypes = {
  [x: string]: string;
}
// 角色
export type roleTypes = {
  [x: string]: string;
}
// 部门
export type deptTypes = {
  [x: string]: string;
}
// 用户
export type userTypes = {
  [x: string]: string;
}
// 线索客户
export type clueCompanyTypes = {
  [x: string]: string;
}
// 菜单
export type menuTypes = {
  name: string;
  path: string;
  parentId: string;
  functionCode: string;
  level: number;
  [x: string]: string | number;
}
// 菜单功能
export type functionTypes = {
  [x: string]: string;
}
// 意向单
export type preOrderTypes = {
  [x: string]: string;
}
// 订单
export type orderTypes = {
  [x: string]: string;
}
// 入仓核实
export type inWarehouseType = {
  [x: string]: string;
}
// 订单文件
export type orderFileTypes = {
  id: string;
  orderId: string;
  category: string;
  name: string;
  path: string;
}
// 审核订单
export type checkOrderTypes = {
  [x: string]: string;
}
// 产品标签
export type productTagTypes = {
  [x: string]: string;
}
// 货重比
export type weightRatioTypes = {
  [x: string]: string;
}
// 活动
export type activityTypes = {
  [x: string]: string;
}
// 优惠券
export type couponTypes = {
  [x: string]: string;
}
// 地址
export type addressTypes = {
  [x: string]: string;
}
// 柜子
export type cabinetTypes = {
  [x: string]: string;
}
// 广告页
export type adPageTypes = {
  [x: string]: string;
}
// 广告位
export type adPositionTypes = {
  [x: string]: string;
}
// 广告
export type adTypes = {
  [x: string]: string;
}
// 账户资金
export type accountFundTypes = {
  [x: string]: string;
}
// 收款记录
export type collectionRecordTypes = {
  [x: string]: string;
}
// 应收账单
export type receivableBillTypes = {
  [x: string]: string;
}


// pager
export type pager = {
  pageNum: number,
  pageSize: number,
  total?: number
}

/**
 * 公共部分
 */
// 公共弹窗
export type modalPropsType = {
  title?: string | ReactElement,
  currentRow?: any,
  visible: boolean;
  onSubmit?: any;
  onCancel?: any;
  loading?:boolean;
  [x: string]: any;
}
// 公共下拉框
export type commonSelectType = {
  list: Array<{[x: string]: any;}>;
  key: string | Array<string>;
  dataValue?: string;
  dataLabel?: string;
}
// proTable ref
export interface ActionType {
  reload: (resetPageIndex?: boolean) => void;
  reloadAndRest: () => void;
  reset: () => void;
  clearSelected?: () => void;
  startEditable: (rowKey: Key) => boolean;
  cancelEditable: (rowKey: Key) => boolean;
}

// pager 
export type pagination = {
  pageNum: number,
  pageSize: number,
  total?: number
}